package com.lucher.mes.dao;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.lucher.mes.po.Producescheduleproblem;
import org.apache.ibatis.annotations.Param;

public interface ProducescheduleproblemMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Producescheduleproblem record);

    int insertSelective(Producescheduleproblem record);

    Producescheduleproblem selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Producescheduleproblem record);

    int updateByPrimaryKey(Producescheduleproblem record);
    
    //自定义接口
    List<Producescheduleproblem> findByList(Producescheduleproblem record);
    List<Producescheduleproblem> findByListForPage(Producescheduleproblem record);
    int findByCount(Producescheduleproblem record);
    public Integer saveBatch(ArrayList<Producescheduleproblem> records);
    List<Producescheduleproblem> findProblemStatByMachine(Producescheduleproblem record);
    //查询返工量
    int findReworkCountByProducecode(Producescheduleproblem record);
    //统计各问题量
    List<Producescheduleproblem> findProblemCountByGrouping(Producescheduleproblem record);


    //XXQ 获取产线上有质检问题的人员列表
    List<Map<String, Object>> getProblemPersonList( @Param("linecode")String linecode

                                                    );

    //XXQ根据产线和人员问题列表
    List<Map<String, Object>> getProblemListByLinecode (@Param("linecode")String linecode,

                                                        @Param("prisonercode")String prisonercode);

    //XXQ 获取当前未处理有问题的质检数据总数
    Integer findNoDoneByCount(Producescheduleproblem record);
    //XXQ 获取当前未处理有问题的问题列表
    List<Producescheduleproblem> findNoDoneByListForPage(Producescheduleproblem record);
}